package Homework;

import java.util.TreeSet;

//测试类---用TreeSet写
public class StudentTest2 {
	
	public static void main(String[] args) {
		
		TreeSet<Student> treeSet = new TreeSet<Student>();
		
		treeSet.add(new Student("Jack", "男", 58));
		treeSet.add(new Student("Lucy","女", 98));
		treeSet.add(new Student("Tom", "男", 77));
		treeSet.add(new Student("William", "男", 39));
		treeSet.add(new Student("James", "男", 82));
		treeSet.add(new Student("Selina", "女", 100));
		
		for(Student stu: treeSet) {
			System.out.println(stu);
		}
		
	}
}
